package com.hc.server.user.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hc.server.user.domain.entity.UserApply;
import com.hc.server.user.domain.entity.UserFriend;
import com.hc.server.user.domain.enums.ApplyTypeEnum;
import com.hc.server.user.mapper.UserFriendMapper;
import org.springframework.stereotype.Service;


/**
 * Created by wdj on 2024/10/23
 */
@Service
public class UserFriendDao extends ServiceImpl<UserFriendMapper, UserFriend> {

    public UserFriend getByFriend(Long uid, Long targetUid) {
        return lambdaQuery().eq(UserFriend::getUid, uid)
                .eq(UserFriend::getFriendUid, targetUid)
                .one();
    }
}
